package componentes;

import java.awt.Color;
import java.awt.Font;

import com.uqbar.metalGear.MGSScene;
import com.uqbar.metalGear.MetalGearGame;
import com.uqbar.vainilla.DeltaState;
import com.uqbar.vainilla.GameComponent;
import com.uqbar.vainilla.appearances.Label;
import com.uqbar.vainilla.events.constants.Key;

public class Mensaje extends GameComponent<MGSScene>{
	
	public Mensaje(double x, double y, String mensaje, Color color){
		
		super(new Label(new Font("verdana", Font.BOLD, 24), color, mensaje), x, y);
		
	}
	
	public void update(DeltaState deltaState) {
		if(deltaState.isKeyPressed(Key.ENTER)){
			this.getGame().setCurrentScene(((MetalGearGame)this.getGame()).buildMGSSCene());
		}
		super.update(deltaState);
	}
	
}
